Chemical defences indicate bold colour patterns with reduced variability in aposematic nudibranchs

The selective factors that shape phenotypic diversity in prey communities with aposematic animals are diverse and coincide with similar diversity in the strength of underlying secondary defences. However, quantitative assessments of colour pattern variation and the strength of chemical defences in assemblages of aposematic species are lacking. We quantified colour pattern diversity using quantitative colour pattern analysis (QCPA) in 13 dorid nudibranch species (Infraorder: Doridoidei) that varied in the strength of their chemical defences. We accounted for the physiological properties of a potential predator’s visual system (a triggerfish, Rhinecanthus aculeatus) and modelled the appearance of nudibranchs from multiple viewing distances (2 and 10 cm). We identified distinct colour pattern properties associated with the presence and strength of chemical defences. Specifically, increases in chemical defences indicated increases in colour pattern boldness (i.e. visual contrast elicited via either or potentially coinciding chromatic, achromatic and/or spatial contrast). Colour patterns were also less variable among species with chemical defences when compared to undefended species. Our results indicate correlations between secondary defences and diverse, bold colouration while showing that chemical defences coincide with decreased colour pattern variability among species. Our study suggests that complex spatiochromatic properties of colour patterns perceived by potential predators can be used to make inferences on the presence and strength of chemical defences.


Introduction
Many animals use aposematic colour patterns to warn potential predators of underlying defences [1], with aposematic species in prey communities exhibiting a remarkable diversity of primary (i.e.colour patterns) and secondary defences (i.e.secondary metabolites) [2][3][4].However, mechanisms shaping diversity within and among aposematic species in prey communities are complex, and many hypotheses on how the presence and strength of secondary defences correlate with phenotypic diversity in a natural prey community remain to be tested (see [5][6][7][8][9] for review and discussion).
Stabilizing selection is a crucial driver underlying the distinct appearance of a given aposematic species in a prey community (e.g.[10]).Once aposematism has evolved, stabilizing selection is expected to constrain colour pattern diversity within species, and Müllerian mimicry rings, as predators learn to associate a visual signal with unprofitability [11][12][13][14][15][16][17].Specifically, an invariant warning signal across aposematic individuals is hypothesized to facilitate and strengthen predator learning and memorization (e.g.[17,18]; but see e.g.[19]).In contrast, variation in signal design may cause predators to make errors when attacking prey and decrease rates of predator learning and increase rates of forgetting [13,[20][21][22].
However, colour pattern diversity within and among aposematic species is common.It is thought to be driven by countervailing evolutionary and ecological factors such as genetic drift, gene flow, variation in resource abundance, variation in predator species, coinciding sexual selection, and environmental biotic and abiotic variability at different spatial and temporal scales (see [5,13,[23][24][25][26][27][28] for discussion and review).Broadly speaking, aposematism in a spatially homogeneous and temporally stable environment coincides with selection towards reduced colour pattern variability within a population (e.g.[7,29]).In contrast, variability of biotic (e.g.predators) and abiotic factors (e.g.temperature) at spatial and temporal scales can favour selection on phenotypic diversity within aposematic species (e.g.[30][31][32]) as well as among them (e.g.[33][34][35]).
Investing in chemical defences is costly [36][37][38][39] and, as a result, can favour the evolution of various forms of mimicry among prey species (e.g.[40]).Mimicry leads to specific, general or partial (e.g.[41][42][43][44][45]) resemblance among species, reducing phenotypic diversity among chemically defended species and undefended mimics.However, key innovations such as chemical defences are thought to enable niche expansions and, as a result, facilitate speciation [46][47][48][49].Adapting to diverse ecological niches, in turn, may lead to phenotypic diversity among aposematic species, especially if such niche specializations underly changes in the signalling environment, such as background habitats or differing light environments.Indeed, a distinct appearance not only from the background but also from conspecifics may aid predator learning [17,[50][51][52] and can provide a mechanism to defend against the parasitic effects of certain types of mimicry, such as Batesian and quasi-Batesian mimicry [50,51,53,54].However, long-standing predictions of the benefit of distinctiveness among aposematic species (e.g.[55][56][57]) are mainly theoretical, with no known studies investigating correlations between distinctiveness and secondary defences among aposematic species in nature.
Attacking well-defended prey is also costly (e.g.[58][59][60]); therefore, predators may generalize more broadly between the colour patterns of previously attacked prey and the prey they subsequently encounter, probably confounded by the cost of making an error (e.g.[61][62][63]).However, how predator generalization between and within aposematic species and their mimics influences correlations between secondary defences and colour pattern diversity is complex, highly debated and probably varies among taxa (see [5,6] for discussion).Furthermore, selection for or against colour pattern variability within and among species can act on individual colour pattern elements or perceptual properties rather than the entire animal, depending on which elements of the signal predators learn or pay attention to (e.g.[10]).Therefore, animal colour patterns should be considered complex multicomponent phenotypes [64] under multiple selective pressures (e.g.[64,65]).
When interpreting the ecological relevance of phenotypic variation, it is essential to consider how the appearance of an organism's colours and patterns changes as a function of observer acuity and viewing distance [66].For example, colour patterns may be cryptic when viewed from a distance but may become aposematic as a predator approaches [66,67].Animals detect objects and decide their identity and quality based on varying combinations of spatiochromatic features [68][69][70][71][72]. Consequently, predator learning of associations between primary and secondary prey defences, or the subsequent retrieval of formed associations from memory, might happen at a specific range of viewing distances concerning specific spatiochromatic properties of prey appearance.However, the scarce empirical evidence on the ecological significance of colour pattern variability in aposematic animals remains restricted to investigations of colour alone and does not account for the visual acuity of ecologically relevant observers and viewing distance (e.g.[73,74]).
Here, we examined how highly defended aposematic nudibranch species differ from less well-defended species in appearance to a potential predator and if among-species variation in perceived colour patterning varies with the presence and strength of chemical defences.Specifically, we hypothesized that differences in the strength of chemical defences would correlate with the presence of colour pattern distinctiveness between species as perceived by a potential predator.We further hypothesized that colour patterns in chemically defended species were less variable than in species without chemical defences as perceived by a potential predator.To do this, we modelled the visual appearance of 13 sympatric dorid nudibranch species to an ecologically relevant animal visual system across multiple viewing distances corresponding to the later stages of an escalating predation sequence [20,75].Specifically, we quantified the perception of within-species colour pattern variability and distinctiveness using the quantitative colour pattern analysis (QCPA) [76], allowing for the consideration of colour, luminance and spatial vision of triggerfish (Rhinecanthus aculeatus).Using exploratory factor analysis (EFA), we identified latent variables to simplify our complex colour pattern space allowing us to compare the colour pattern appearance of individuals belonging to three levels of chemical defence.Chemical defences were defined using previously published assay data [77,78].We then investigated differences in the perceived appearance and variability of colour patterns for species belonging to each level of chemical defences.

Material and methods (a) Study species
We used digital photographs of 311 dorid nudibranchs using a calibrated Olympus EPL-5 with a 60 mm macro lens (see electronic supplementary material for details on camera calibration).These individuals belonged to 13 species: Aphelodoris Hypselodoris bennetti (n = 13), Phyllidia ocellata (n = 32), Phyllidia varicosa (n = 9) and Phyllidiella pustulosa (n = 40) (figure 1).These individuals were sampled between March 2016 and February 2021 from five locations on the east coast of Australia: Mackay (Queensland), Sunshine Coast (southeast Queensland), Gold Coast (southeast Queensland), Cook Island (New South Wales) and Nelson Bay (New South Wales).In total, 2 out of 13 species (Doriprismatica atromarginata and Goniobranchus splendidus) were sampled across sites in Queensland and New South Wales in high numbers, whereas the other species were only sampled in either New South Wales or Queensland, or with highly uneven numbers between sites (electronic supplementary material, table S1).Two individuals of Chromodoris magnifica were provided by an aquarium supplier (Cairns Marine, Cairns, Queensland).These species were selected as they were relatively abundant at our study sites and covered a broad range of visual appearances and strengths of chemical defences.Furthermore, we have previously provided data on the strength and identity of chemical defences in these species sampled from the same locations as individuals from this study [77,78].
Most nudibranchs were photographed underwater against their natural habitat (n = 182) with the camera in an Olympus PT-EP10 underwater housing and using white LED illumination from a combination of VK6r and PV62 Scubalamp video lights.The remaining nudibranchs (n = 129) were collected for separate studies on their chemical defences, taken back to the laboratory, submerged in water in a Petri dish and photographed against a white background with the same camera.In the laboratory, nudibranchs were illuminated with 400-700 nm broad-spectrum white LED lights.Table S1 in the electronic supplementary material details collection sites and dates, and camera and illumination spectra are provided in [76].A sub-sample of these images was previously used to investigate distance-dependent signalling regarding colour pattern detectability and boldness [79].

(b) Image analysis
We used ImageJ [80] and the MICA toolbox [81] to manually segment the images into regions of interest (ROIs).This was done by outlining and selecting the animal from its background and defining a size standard.All nudibranchs were aligned head up in the image before analysis with QCPA [76], with the rotation causing most of each animal's body to be aligned vertically.
We analysed colour patterns for viewing distances of 2 cm and 10 cm, using the estimated spatial acuity of the triggerfish of three cycles per degree [82,86].A viewing distance of 2 cm represents the spatiochromatic information available to a triggerfish upon immediate contact with a nudibranch.A viewing distance of 10 cm more likely represents visual information available to a triggerfish at a short distance where a subjugation attempt has not yet been made.Following acuity modelling, the images were processed with a receptor noise limited (RNL) ranked filter (falloff: 3, radius: 5, repetition: 5) and clustered using RNL clustering with a colour threshold of 2 ∆S [87,89] and a luminance contrast threshold of 4 ∆S [90] for all analyses except the local edge intensity analysis (LEIA), which does not require RNL clustering but is recommended to be subjected to RNL ranked filtering [76].We calculated receptor-specific Weber fractions based on a relative photoreceptor abundance of 1 : 2 : 2 : 2 (sw : mw : lw : dbl) and photoreceptor noise of 0.05 [83], resulting in 0.07 : 0.05 : 0.05 : 0.05.
QCPA analysis was achieved using a custom batch script [91] running on high-performance computing (HPC) infrastructure.We analysed each animal colour pattern using: (i) colour adjacency analysis (CAA), which describes pattern geometry in a segmented image; (ii) visual contrast analysis (VCA), which describes pattern boldness based on chromatic and spatial pattern element properties in a clustered image; (iii) boundary strength analysis (BSA), which describes the colour and luminance contrast of boundaries between pattern elements at the scale of an animal in an unclustered image; and (iv) LEIA, which describes the strength of colour and luminance contrast at the scale of an edge-detecting receptive field in an unclustered image.This resulted in a highly descriptive array of 157 colour pattern statistics for each animal.A detailed description of each pattern statistic can be found in [76].Here, we use CAA, VCA, BSA and LEIA as prefixes for each type of analysis.
All pattern analyses, except LEIA, used a segmented image and measured transitions between pixels along vertical (along the body axis) and horizontal (perpendicular to the body axis) sampling transects in a transition matrix.Statistics ending with 'vrt' or 'hrz' are the vertical (i.e.up-down in image) and horizontal versions (analysing the respective transition matrix only) of their respective statistic (analysing the full transition matrix) and can represent differential directionality sensitivity in the visual system of an observer and directionality in patterns such as stripes [92][93][94].LEIA does not use a transition matrix owing to the lack of image segmentation.Equally, it discriminates between horizontal and vertical edge contrast by describing the shape of a histogram drawn from edge contrast measurements in a given image or region of interest [76].

(c) Chemical defences
To categorize the level of chemical defences for each species, we used previously published data on the deterrent properties from feeding rejection assays with rockpool shrimp (Palaemon serenus), which demonstrate similar results to assays performed with triggerfish and toadfish [77] and toxicity assays with brine shrimp [77,78].All animals in these studies were collected in situ and immediately stored at −20°C.Assays were conducted by adding extracted nudibranch compounds to food pellets made from squid mantle at increasing concentrations.Effective dose (ED 50 ) and lethal dose (LD 50 ) values in [77,78] were calculated based on the concentration that elicited a rejection response in, or mortality of, at least 50% of the shrimp.For detailed information on the collection and processing of samples, please see the original studies [77,78].For this study, we averaged ED 50 and LD 50 values from [77] when multiple extracts from the same species were reported.We considered only whole-body extracts (rather than mantle-only values) to make assay values comparable between species.We then subtracted these values from 1 so that values close to 0 were the most palatable/non-toxic, and values close to 1 were the least palatable/toxic (electronic supplementary material, table S1).Although Chromodoris magnifica was not included in [77], another study [95] demonstrated that this species also stores latrunculin A as the sole defensive compound in the mantle rim at concentrations between those found in Chromodoris elisabethina and Chromodoris kuiteri [96].We therefore set unpalatable ED 50 values as the average from these two sister species for C. magnifica.Lastly, assay data for Glossodoris vespa is presented in [78].
Like Winters et al. [77], we binned the species into categories indicating chemical defence strength to account for our dataset's highly uneven spread in toxicity and palatability values and the difference in sampling levels between colour pattern data and chemistry data.Our categorization differed from that of Winters et al. [77] in that we based our categories on the assumption of a sigmoidal dose-effect response similar to a psychometric curve.Species were allocated in the following classes (figure 1), where we treated NR values from [77] as 0: -Not defended (1 − LD 50 = 0 and 1 − ED 50 = 0) -Toxic and moderately unpalatable (1 − LD 50 > 0 and 0.25 < 1 − ED 50 > 0.74), -Toxic and highly unpalatable (1 − LD 50 > 0 and 0.74 < 1 − ED 50 ).
The threshold to distinguish between medium and high levels of unpalatability was 0.74, representing the median (1 − ED 50 ) value of chemically defended species while also being very close to the point-of-inflexion in a sigmoidal response curve.Only 3 out of 10 species with chemical defences had (1 − LD 50 ) values below 0.5, yet 6 out of 10 had values above 0.80.Therefore, we did not distinguish between different toxicity levels in our dataset.Treating toxicity as present/absent and distinguishing between medium and high levels of unpalatability ensured at least three species in each category, allowing the investigation of differences in animal colouration between variable levels of chemical defences.

(d) Statistical analysis
Our study considers many of the more commonly found dorid nudibranchs in the study sites (e.g.[97][98][99]).To analyse the large dataset derived from the QCPA analysis, we only kept images that did not produce any missing value for any pattern metrics, reducing the number of individuals used for the 10 cm analysis from 311 (in situ images: 182, lab images: 129) to 289 (in situ images: 165, lab images: 124).VCA, CAA, and BSA metrics can produce NaN or infinite values if a colour pattern has less than two colour pattern elements following RNL clustering [76].LEIA metrics do not suffer from this limitation.Nine available images from Discodoris sp. were rejected from analysis owing to this constraint, resulting in the reported sample size.
We then applied a latent variable EFA with the R package psych using the factoring method of ordinary least squares 'ols' and the orthogonal rotation 'varimax'.To prepare the dataset for the EFA, we first filtered the number of highly correlated QCPA metrics by keeping only those that were less correlated than 0.6 (Pearson correlation), which reduced their number from 157 to 15 (electronic supplementary material, table S2).Using EFA we identified factors with eigenvalues greater than the median of the eigenvalues extracted from 10 000 randomly generated datasets with the same number of rows and columns

No known chemical defences
Toxic and moderately unpalatable ~1 cm Toxic and highly unpalatable (a) of the original data.Three factors were identified as crucial to describing variation in our colour pattern data.We then ran the factor analysis based on these three factors, presented in order of the percentage explained variation by each factor.We report the loadings of each factor (i.e.their correlation with each of the QCPA metrics, with bootstrapped confidence intervals generated by iterating the factor analysis 1000 times).
Looking at the loadings of each factor, we can identify what latent variable they describe.While it would be possible to discuss each factor extensively, we keep their description to loadings of ± 0.4 (out of 0-1) to capture their main properties.Owing to data filtering for metrics less correlated than 0.6, the QCPA parameter listed for a given loading is likely synonymous with various other parameters in our 157-dimension colour pattern space (electronic supplementary material, table S2).For a detailed explanation of each colour pattern parameter, see electronic supplementary material, table S2.Therefore, the precise wording to describe each factor can vary depending on which colour pattern metrics are put into focus-for example, BSA.BMSL.Vrt is positively associated with factor 1 (figure 2) but is simply a placeholder for BSA.BMSL (both considering horizontal and cumulative transitions) as it is 92-96% correlated with these metrics and 97% correlated with BSA.BML (electronic supplementary material, table S2).However, unlike BSA.BMSL (which describes boundary contrast using the mean RNL luminance contrast between colour pattern elements relative to the fraction of the respective pattern border), VCA.BML captures boundary contrast calculated by the Weber contrast of cone catches in the luminance channel between colour pattern elements relative to the fraction of a given boundary type.Thus, it would be more appropriate to say that animals with high values of factor 1 are associated with stronger achromatic colour pattern boundary contrast rather than explicitly referring to the randomly retained value only.A complete list of all colour pattern parameters with more than 0.6 Pearson correlation with parameters associated with factors 1-3 shown in figure 2 can be found in the electronic supplementary material (table S2).
The scores of the factors extracted from the EFA were then used to implement three phylogenetic, distributional linear mixed models to compare the colour patterns of nudibranchs with different levels of chemical defences.Models were run in R v. 4.1.2[100] using the brms package [101], which fits Bayesian models using Stan [102].To account for the phylogenetic dependency of closely related species, all models included the phylogenetic tree of the 13 species of nudibranchs (electronic supplementary material, figure S1), with the tree from [103] pruned and missing species added according to their taxonomic classification in the World Register of Marine Species [104].The phylogenetic model was implemented following the guidelines of the online brms vignette (https://cran.r-project.org/web/packages/brms/vignettes/brms_phylogenetics.html) based on de Villemereuil & Nakagawa [105].
The first model investigated differences in scores for latent factor 1 between nudibranchs with different levels of chemical defences (see §2c) using a Student distribution.The model estimated the effect of the main categorial predictors level of chemical defence (undefended; toxic and moderately unpalatable; toxic and highly unpalatable) and observer distance (2 and 10 cm) and their interaction on both the mean and the residual standard deviation of the response distribution.To account for repeated measurements of each species, we also included species ID as a random intercept to the model.We further included random slopes over distance because of their relationship with the value of the response factor 1 varied among species.The second and third models were identical to the first but used factor 2 and factor 3 as response variables.
All models were fitted using weakly informative prior distributions (normal with mean = 0 and s.d.= 5 for intercept and coefficients, exponential (1) for standard deviations).Their performance was evaluated using posterior predictive model checking, which compares model predictions with observed data to assess overall model fit.We ran four Markov chain Monte Carlo (MCMC) chains for each model and obtained coefficient estimates from 8000 post-warm-up samples.All model parameters reached reliable conversion indicators [106]: a Monte Carlo standard error smaller than 5% of the posterior standard deviation, an effective posterior sample size greater than 10% of the total sample size and a R statistic value smaller than 1.01.
We present the medians of latent factors values and their 95% credible intervals of the posterior distributions of fitted values for the population average, obtained from the joint posterior distributions of the model parameters for the combination of chemical defences and distance [106,107] (figure 2).The same posterior distribution of fitted values was used to compute pairwise differences and their 95% credible intervals between all the combinations of the same two categorical predictors using the 'emmeans' R package [108].To compare variances of responses between all predictor groups (i.e.among-group variation of colour patterning), we also computed the posterior distribution of all pairwise differences of the residual standard deviation on the original scale (back-transformed from the log scale).The effect size of pairwise differences increases with increasing deviation of such differences from 0, and the robustness of the result increases with a decreasing degree of overlap of the 95% credible intervals (CIs) with 0; see the electronic supplementary material, figure S2 for a schematic of the cumulative methodology.

Results
We identified three latent factors describing overall differences in colour pattern appearance of a triggerfish (R. aculeatus).We describe each factor at 2 and 10 cm, respectively.While not intended to identify a maximal amount of variability in colour pattern variation in our dataset, the three factors still explained 38% of the total variation (factor 1: 14%; factor 2: 13%; factor 3: 11%) (figure 2).

(a) Factor 1: colour patterns with high achromatic contrast have low colour contrast
Factor 1 described 14% of colour pattern variability in our dataset.It was associated with high loadings of luminance contrast between colour patches as a function of their patch size, which VCA describes (figure 2a).We found high loadings for mean and standard deviation variation measures of pattern contrast measured as cone catches of the luminance channel (e.g.VCA.CVL) and using the RNL model (e.g.VCA.MSL).We also found high luminance pattern contrast captured by factor 1 as an expression   The strength of the difference between the two groups increases with decreasing degree of overlap of their 95% CIs.
of the boundary contrast (BSA), which refers to contrast scaled by the length of boundaries between colour patches rather than their size.Given that larger patches tend to have longer boundaries, it is not surprising that we find similar loadings for measures relative to either.The negative loadings for chromatic colour pattern contrast (e.g.VCA.MDmax) indicate that patterns with strong and variable achromatic contrast tend to have a reduced level of average chromaticity contrast.High factor values would indicate the presence of black and white, pale hues or long wavelength colours that appear of low chromaticity to the visual system of a triggerfish.
Contrasts (difference (±95% CI)) between groups of chemical defences indicated that toxic species with high levels of unpalatability differed in appearance from toxic species with moderate levels of unpalatability (figure 2b; electronic supplementary material, table S4).However, undefended species did not differ from chemically defended species for factor 1. At a 2 cm viewing distance, there were little differences in appearance between undefended species and toxic and highly unpalatable species (0.99 (−2.31/0.31)).In contrast, toxic and moderately defended species had a lower score (−1.23 (−1.74/−0.70))for factor 1 compared to toxic highly unpalatable species (figure 2b).The lack of a strong pattern difference between defended and undefended species, but the difference between defended species is present at immediate contact between the triggerfish and prey at 2 cm, as well as at 10 cm (undefended vs. toxic and highly unpalatable: −0.60 (−2.00/0.81);toxic and medium unpalatable vs. toxic and highly unpalatable: −1.01 (−1.67/−0.33)).Toxic animals with medium levels of unpalatability did not differ from undefended species regarding factor 1 at either 2 cm (0.21 (−1.10/1.56)or 10 cm (0.40 (−1.09/1.82).We found no indication of differences in colour pattern variability between different groups as captured by factor 1 (electronic supplementary material, table S5).Therefore, our results indicate higher levels of achromatic contrast and lower levels of chromatic contrast present in the colour patterns of toxic highly unpalatable species compared to the other groups, with the increase in achromatic contrast coinciding with more prominent relatively achromatic colour pattern elements.
(b) Factor 2: highly contrasting colour patterns are more regular and vertically elongated Factor 2 explained 13% of colour pattern variability in our dataset.It describes the relationship between decreases in the aspect ratio of colour patterns (CAA.Asp) coinciding with decreases in average patch size (CAA.Pt) as well as decreases in the average luminance contrast (e.g.VCA.ML) and its variability (e.g.VCA.sL) between patches in the horizontal axis and increases in various measures of chromatic and achromatic colour pattern contrast variability relative to the mean contrast in a given colour pattern (e.g.VCA.CVSL, VCA.CVS) as well as increases in colour pattern transition regularity (e.g.CAA.Qt) (figure 2c).
Contrasts [difference (±95% CI)] between the different groups of chemical defences indicated that chemically defended species do not have higher scores for factor 2 than undefended species (figure 2d; electronic supplementary material, table S6).There was also no difference in factor values between toxic and medium unpalatable animals and toxic and highly unpalatable animals at either 2 cm (0.05 (−0.84/0.94)or 10 cm (0.06 (−0.91/0.92)).However, at 2 cm viewing distance, undefended species had more variable colour patterns than toxic and moderately unpalatable species (0.40 (0.14/0.74) as well as toxic and highly unpalatable species (0.31 (0.06/0.67)) (electronic supplementary material, table S7).

(c) Factor 3: colour patterns with variable edge contrast have reduced spatial evenness
Factor 3 explains 11% of colour pattern variability in our dataset.It describes positive changes in colour (e.g.Col.kurtosis) and luminance (e.g.Lum.kurtosis) contrast variability relative to the average contrast in an animal coinciding with reduced colour pattern evenness (e.g.CAA.Q c ) as well as decreased average luminance contrast of boundaries between colour pattern elements (e.g.Lum.mean) and decreased overall colour pattern complexity (CAA.C) (figure 2e).

Discussion
We identified three latent variables that captured differences in appearance between distinct differences in colour patterns between our three levels of chemically defended groups of nudibranch molluscs (figure 2).Our analysis captures a significant proportion of variability in the dataset (38%) and indicates substantial colour pattern variation among sampled species across multiple viewing distances as perceived by a potential predator (figure 2).We found differences in appearance both between chemically defended and undefended species and also between toxic/moderately unpalatable species and toxic/highly unpalatable species.These differences in colour patterns between species belonging to different levels of chemical defences are likely visible to a potential predator at close contact (2 cm) and from further away (10 cm) and might be used by predators to infer the presence and strength of underlying chemical defences based on the general appearance of prey animals.
The colour patterns of chemically defended species were less variable than those of undefended species (figure 2d; electronic supplementary material, table S5).Specifically, the within-group variability of colour and luminance contrast and the spatial arrangement of colour pattern elements was reduced in species with chemical defences compared to those without.Furthermore, the colour patterns of toxic species with high levels of unpalatability were different in appearance from toxic species with royalsocietypublishing.org/journal/rspb Proc.R. Soc.B 291: 20240953 moderate levels of unpalatability (figure 2b; electronic supplementary material, table S4).Specifically, species with high levels of unpalatability showed increased levels of achromatic contrast between colour pattern elements compared to more palatable toxic species.This increase in achromatic contrast in highly unpalatable species coincides with a decrease in the mean level of chromatic contrast relative to toxic species with lower levels of unpalatability.This trade-off between colour and luminance contrast is possibly explained by the presence of more highly contrasting achromatic patches in chemically defended species, such as black or white in contrast to more saturated brownish hues in undefended species (figure 1).Overall, the differences in the visual appearance of a potential predator between species of nudibranchs with different levels of chemical defences describe general colour pattern properties (such as pattern regularity and spectral contrast) associated with aposematic signalling (figure 2).Therefore, in agreement with existing literature (e.g.[2,109]), we find that dorid nudibranch colour patterns are highly diverse and that the presence of chemical defences correlates with the presence of boldly contrasting colour patterns.
The observed differences in animal colouration between groups of species with varying levels of chemical defences generally agree with and can be interpreted as indicating selective factors driving between-species pattern diversity in conjunction with the presence of secondary defences.Such drivers of phenotypic diversity can favour distinctiveness among chemically defended species, either as a means to defend against Batesian mimicry (e.g.[53]), as well as the potential need to optimize signalling efficacy across a complex, spatially and temporally variable biotic and abiotic environment (e.g.[5,13,[23][24][25][26][27][30][31][32][33][34][35]).Thus, our results agree with predictions made by assuming facilitated niche expansion and subsequent speciation and adaptation to visually diverse habitats [46][47][48][49] as potential drivers of phenotypic diversity in chemically defended species.
Our results further suggest the general presence of secondary defences to coincide with reduced colour pattern variability among species when viewed up close by a potential predator (figure 2e; electronic supplementary material, table S5).Reduced variability among chemically defended species may suggest the presence of broadly generalizable, qualitative signalling properties underlying aposematic signalling in the species considered in this study.However, the presence of distinct colour pattern appearance at a quantitative scale (i.e.comparing species with different levels of chemical defences) would align with chemical defences favouring visual distinctiveness from co-occurring Batesian or quasi-Batesian and Müllerian mimics (e.g.[17,53]).In other words, considering colour patterns as complex, multicomponent signals, it is possible to think of certain colour pattern properties indicating the qualitative presence of secondary defences ('is the animal defended or not?') (e.g.[50]).In contrast, others indicate the quantitative presence of secondary defences ('how potent are the defences?'),thus allowing different parts of simultaneously perceived visual information elicited by animal colouration to be under seemingly opposing selection pressures towards and away from general resemblance.Thus, here we possibly present the first empirical evidence for the coexistence of what Summers et al. [7] term quantitative and qualitative signal honesty using complex, spatiochromatic measures of colour pattern appearance considering an ecologically relevant observer (see [8] for a review of empirical evidence of quantitative signal honesty in aposematic species).How predators use and differentiate between these types of information is likely context-and receiver-dependent, ultimately relating back to receiver psychology and cognition, such as continuous or categorical morphotype perception and memorization (e.g.[42,110,111]).In addition to these perceptual modalities possibly being realized simultaneously, trade-offs between selective pressures for and against multiple, seemingly contractionary signalling properties of colour patterns can be mediated by distance-dependent signalling (e.g.[79,112]).Our results suggest both to be possible, with colour pattern variability only differing between groups of species with and without chemical defences at 2 cm viewing distance but not 10 cm.In contrast, toxic and highly unpalatable species differ in their appearance from toxic and moderately defended species as well as undefended ones at 2 cm and 10 cm.
Phenotypic diversity within (e.g.polymorphism and polyphenism) and among chemically defended species is generally described as a detriment to predator learning, with selection towards resemblance underlying purifying selection at the species level (e.g.[13,[20][21][22]) and Müllerian mimicry at the community level (e.g.[35,44,[113][114][115][116]).However, phenotypic diversity among chemically defended species might, contrary to what empirical evidence might currently suggest (e.g.[35]), benefit predator learning as it can lead to more stable, generalizable associations [117] when considered in a predator-specific, highdimensional colour pattern space, and, thus, provide mutual benefits among chemically defended species considered in the context of qualitative and quantitative signal honesty and mimicry.For example, concerning variability in chemical defences (but not visual appearance), Barnett et al. [30] found that variability in the strength of chemical defences of food items hidden underneath uniformly coloured lids led to a survival benefit when presented to European starlings (Sturnus vulgaris).Further experimental investigations into the importance of signal variability for avoidance learning in non-human animals would be of great interest for future research as it, in turn, would inform our assumptions on the mechanisms underlying the evolution and maintenance of colour pattern diversity within and among chemically defended species.
Our methodology is tailored to reflect the fact that colour pattern elements and signalling properties do not exist in isolation, thus warranting an 'agnostic' approach to deduce correlations between predictor and dependent variables in the context of a complex trait described by a high-dimensional dataset (i.e.colour pattern space) [8,71,76].Importantly, our analysis specifically analyses the appearance of each animal as a whole rather than specific components of their colour patterns.Therefore, even if specific colour pattern features might be under purifying selection among certain species (e.g. as a result of mimicry), this was not captured by latent variables capturing overarching differences between individuals and species in the data set.Our results indicate that aposematic species' overall colour pattern phenotype might indeed be selected for less variability when compared to that of undefended species.However, our methodology does not address the possibility that specific colour pattern elements and signalling properties among aposematic species and putative mimics could be under purifying selection.Examples of this have been documented both within and between species of nudibranchs [3,10] and could apply to our dataset with representatives of a putative yellow-rim mimicry ring [118] (figure 1).This consideration is of broad relevance across all studies using methodology describing the cumulative colour pattern appearance of an animal, rather than specific colour pattern elements or body areas.

Figure 2 .
Figure 2. Detailed visual representation of the loadings of factor 1 (a), factor 2 (c) and factor 3 (e).Greyed-out factor loadings indicate colour pattern descriptors with minor contributions to each factor.Factor scores for each group with different strengths of chemical defences are given for factor 1 (b), factor 2 (d) and factor 3 (f).Estimates are given for 2 cm viewing distance (left panel, white) and 10 cm (right panel, grey).Coloured points represent repeated observations for each species (n = 13).Black vertical bars represent group-predicted medians and 95% credibility intervals (CIs) derived from the joint posterior distributions of the model parameters.The strength of the difference between the two groups increases with decreasing degree of overlap of their 95% CIs.